for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
Mivhak.component('toggle', {
Mivhak
/** global: Mivhak */
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.
template: '<div class="mivhak-toggle"><div class="mivhak-toggle-knob"></div></div>',
props: {
on: true
},
events: {
click: function() {
this.toggle();
}
created: function() {
this.$el.addClass('mivhak-toggle-'+(this.on?'on':'off'));
methods: {
toggle: function() {
this.on = !this.on;
this.$el.toggleClass('mivhak-toggle-on').toggleClass('mivhak-toggle-off');
});
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.